package com.geostart.constructionland.system.controller;

import com.geostar.constructionland.common.entity.response.ExtJsAjaxResponse;
import com.geostart.constructionland.system.service.LogStatisticsFeignClient;
import io.swagger.annotations.Api;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 *
 * @author zhu jiacheng
 * @date 2020/7/27 20:00
*/
@Slf4j
@Controller
@Api("执行记录")
public class LogStatisticsController {

    @Autowired
    private LogStatisticsFeignClient logStatisticsFeignClient;


    @RequestMapping(path = "/logStatistics/profile")
    public String initPage(){
        return "profile/log_statistics";
    }

    @ResponseBody
    @PostMapping(path = "/logStatistics/list")
    public ExtJsAjaxResponse list(
            @RequestParam(value = "page") int pageNo,
            @RequestParam(value = "limit") int pageNum,
            @RequestParam(required = false) String query_fxlx) {
        return logStatisticsFeignClient.list(pageNo, pageNum,query_fxlx);
    }
}
